home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
dde1
/
main.frm
< prev
next >
Wrap
Text File
|
1993-05-26
|
17KB
|
597 lines
VERSION 2.00
Begin Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "DDE Experimenter"
FontTransparent = 0 'False
Height = 5745
Left = 930
LinkMode = 1 'Source
LinkTopic = "System"
ScaleHeight = 5340
ScaleWidth = 6210
Top = 1125
Width = 6330
Begin Frame Frames
Caption = "Destination Data"
Height = 3015
Index = 2
Left = 120
TabIndex = 21
Top = 2280
Width = 6015
Begin TextBox txtData
Height = 2160
Left = 120
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 22
Text = "Text1"
Top = 720
Width = 5760
End
Begin OptionButton optDataType
Caption = "Graphics"
Height = 255
Index = 1
Left = 1440
TabIndex = 14
Top = 360
Width = 1815
End
Begin OptionButton optDataType
Caption = "Text"
Height = 255
Index = 0
Left = 120
TabIndex = 13
Top = 360
Value = -1 'True
Width = 1095
End
Begin PictureBox picData
AutoRedraw = -1 'True
DrawWidth = 2
Height = 2160
Left = 120
ScaleHeight = 2130
ScaleWidth = 5730
TabIndex = 23
Top = 720
Visible = 0 'False
Width = 5760
End
End
Begin Frame Frames
Caption = "Source Properties"
Height = 1440
Index = 1
Left = 4200
TabIndex = 20
Top = 720
Width = 1920
Begin TextBox txtSourceTopic
Height = 285
Left = 120
TabIndex = 17
Text = "System"
Top = 960
Width = 1695
End
Begin CheckBox chkSourceMode
Caption = "&Source Enabled"
Height = 240
Left = 120
TabIndex = 15
Top = 360
Value = 1 'Checked
Width = 1680
End
Begin Label Labels
Caption = "Source &Link Topic"
Height = 240
Index = 3
Left = 120
TabIndex = 16
Top = 720
Width = 1680
End
End
Begin CommandButton cmdExit
Caption = "E&xit"
Height = 480
Left = 4200
TabIndex = 18
Top = 120
Width = 1920
End
Begin Frame Frames
Caption = "Destination Properties"
Height = 2160
Index = 0
Left = 120
TabIndex = 19
Top = 0
Width = 3960
Begin ComboBox cboAppName
Height = 300
Left = 1200
TabIndex = 1
Text = "ProgMan"
Top = 360
Width = 1215
End
Begin ComboBox cboTopic
Height = 300
Left = 720
TabIndex = 3
Text = "ProgMan"
Top = 720
Width = 1695
End
Begin ComboBox cboItem
Height = 300
Left = 720
TabIndex = 5
Top = 1080
Width = 1695
End
Begin OptionButton optLinkMode
Caption = "&Notify"
Height = 240
Index = 3
Left = 2640
TabIndex = 8
Top = 1200
Width = 960
End
Begin CommandButton cmdExecute
Caption = "&Execute"
Enabled = 0 'False
Height = 480
Left = 2640
TabIndex = 12
Top = 1560
Width = 1080
End
Begin CommandButton cmdPoke
Caption = "&Poke"
Enabled = 0 'False
Height = 480
Left = 1440
TabIndex = 11
Top = 1560
Width = 1080
End
Begin CommandButton cmdRequest
Caption = "&Request"
Enabled = 0 'False
Height = 480
Left = 240
TabIndex = 10
Top = 1560
Width = 1080
End
Begin OptionButton optLinkMode
Caption = "&Manual"
Height = 240
Index = 2
Left = 2640
TabIndex = 7
Top = 960
Width = 960
End
Begin OptionButton optLinkMode
Caption = "A&utomatic"
Height = 240
Index = 1
Left = 2640
TabIndex = 6
Top = 720
Width = 1200
End
Begin CommandButton cmdConnect
Caption = "&Connect"
Height = 480
Left = 2520
TabIndex = 9
Top = 240
Width = 1320
End
Begin Label Labels
Caption = "Item"
Height = 255
Index = 2
Left = 120
TabIndex = 4
Top = 1080
Width = 615
End
Begin Label Labels
Caption = "&Topic"
Height = 255
Index = 1
Left = 120
TabIndex = 2
Top = 720
Width = 615
End
Begin Label Labels
Caption = "&Application"
Height = 255
Index = 0
Left = 120
TabIndex = 0
Top = 360
Width = 975
End
End
Begin Label lblSysLink
Height = 375
Left = 4440
TabIndex = 25
Top = 5400
Visible = 0 'False
Width = 1455
End
Begin Label Topics
Height = 375
Left = 120
TabIndex = 24
Top = 5400
Visible = 0 'False
Width = 2175
End
End
Option Explicit
Option Compare Text ' Perform case-insensitive string comparisons
Dim TopicChangeFlag As Integer, appChangeFlag As Integer, Connected As Integer
Dim NotifyFlag As Integer
Const DEST_TEXT = 0, DEST_PIC = 1
Const MNU_COPY = 0, MNU_PASTE = 1, MNU_PASTELINK = 2
Sub cboAppName_Click ()
If Connected Then cmdConnect.Value = True
FillTopicList
End Sub
Sub cboAppName_LostFocus ()
If appChangeFlag Then
appChangeFlag = False
If Connected Then cmdConnect.Valu